<?php
$request = Zend_Controller_Front::getInstance()->getRequest();
$accion = $request->getActionName();
$controlador = $request->getControllerName();
$agregadoUrl = '/accion_origen/' . $accion . '/controlador_origen/' . $controlador;
?>
<!DOCTYPE html>
<html lang="es">
    <head>
        <!--<meta charset="utf-8">-->
        <meta charset="ISO-8859-1">
        <title>CredyPhone</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <!-- Le styles -->
        <link type="text/css" href="<?php echo $this->baseUrl(); ?>/bootstrap/css/bootstrap.css" rel="stylesheet">
        <style type="text/css">
            body {
                <?php if (!is_null($this->colorSucursal)) { ?>
                    background-color:#<?php echo $this->colorSucursal[0] ?>; 
                <?php } else { ?>
                    background-color:#6FA57E;
                <?php } ?>
                padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
            }
            .well, .well-small {
                <?php if (!is_null($this->colorSucursal)) { ?>
                    background-color:#<?php echo $this->colorSucursal[1] ?>; 
                <?php } else { ?>
                    background-color:#81d081;
                <?php } ?>
                border-color: #252525;
                border-color:transparent;
                margin-bottom: 10px;
            }
            legend {
                font-size: 16px;
                <?php //echo "color:" . $this->colorFuente . ";"; ?>
                color: #252525;
                border-color: #252525;
                margin-bottom: 10px;
                line-height: 30px;
                font-weight: bolder;
            }
            label {
                margin-bottom: 0px;
            }
            .thumbnail{
                width: 60px;
                background: #fcfff4; /* Old browsers */
                background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 35%, #b3bead 100%); /* FF3.6+ */
                background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fcfff4), color-stop(35%,#dfe5d7), color-stop(100%,#b3bead)); /* Chrome,Safari4+ */
                background: -webkit-linear-gradient(top, #fcfff4 0%,#dfe5d7 35%,#b3bead 100%); /* Chrome10+,Safari5.1+ */
                background: -o-linear-gradient(top, #fcfff4 0%,#dfe5d7 35%,#b3bead 100%); /* Opera 11.10+ */
                background: -ms-linear-gradient(top, #fcfff4 0%,#dfe5d7 35%,#b3bead 100%); /* IE10+ */
                background: linear-gradient(to bottom, #fcfff4 0%,#dfe5d7 35%,#b3bead 100%); /* W3C */
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead',GradientType=0 ); /* IE6-9 */
            }
            .print {
                display:none ;
            }
        </style>
        <style type="text/css">
            @media print {
                .noPrint {
                    display:none;
                }
                .print {
                    display:inline ;
                }
                .imprimirSinBordes{border-style: none;}
                    
            }
        </style>
        
        <style type="text/css">
            .tabla_reducida {
                font: 63.5%/1.3 normal Helvetica, sans-serif;
                border-collapse: collapse;
                width: 100%;
                background-color: #FFF;
            }

            .tabla_reducida td, .tabla_reducida th { 
                text-align: center; 
                border: 1px solid #ddd; 
                padding:.5em 5px;
                font-size: 1.2em;
            }

            .tabla_reducida th { 
                background-color:#f4f4f4;
                font-weight: bold;
            } 
            .tabla_reducida caption {
                margin: 0; 
                font-weight: bold; 
                font-size: 1.3em; 
                background: #eee;
                padding: 10px;
                border: 1px solid #ddd; 
            }
            .tabla_reducida tr:hover { background-color: #b3bead;}
            
        </style>
        <link href="<?php echo $this->baseUrl(); ?>/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">

        <!--<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/js/jquery-1.11.0.min.js"></script>-->
        <script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/js/jquery-1.8.3.js"></script>
        <script src="<?php echo $this->baseUrl(); ?>/bootstrap/js/bootstrap.min.js"></script>

        <!-- validate -->
        <script type="text/javascript" src="<?php echo $this->baseUrl("/js/jquery-validate/jquery.validate.min.js"); ?>"></script>
        <script type="text/javascript" src="<?php echo $this->baseUrl("/js/jquery-validate/additional-methods.min.js"); ?>"></script>
        <!-- end validate -->

        <!-- DatePicker UI -->
        <link rel="stylesheet" href="<?php echo $this->baseUrl("/js/jquery-datepicker/css/ui-lightness/jquery-ui-1.9.2.custom.min.css"); ?>" />
        <script type="text/javascript" src="<?php echo $this->baseUrl("/js/jquery-datepicker/js/jquery-ui-1.9.2.custom.min.js"); ?>"></script>
        <script type="text/javascript" src="<?php echo $this->baseUrl("/js/jquery-datepicker/js/datepickerARG.js"); ?>"></script>

        <!-- scroll -->
        <link rel="stylesheet" href="<?php echo $this->baseUrl("/js/jquery.chromatable/css/style.css"); ?>" />
        <script src="<?php echo $this->baseUrl(); ?>/js/jquery.chromatable/jquery.chromatable.js"></script>
        <!-- end scroll -->
        
        <!-- colorbox -->
        <link type="text/css" href="<?php echo $this->baseUrl(); ?>/js/colorbox/css/colorbox.css" rel="stylesheet" />
        <script src="<?php echo $this->baseUrl(); ?>/js/colorbox/jquery.colorbox.js"></script>
        <!-- END  colorbox-->

        <!-- tooltips -->
        <link type="text/css" href="<?php echo $this->baseUrl(); ?>/js/tooltips/tip-yellowsimple/tip-yellowsimple.css" rel="stylesheet" />
        <link type="text/css" href="<?php echo $this->baseUrl(); ?>/js/tooltips/tip-darkgray/tip-darkgray.css" rel="stylesheet" />
        <script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/js/tooltips/jquery.poshytip.js"></script>
        <!--<script type="text/javascript" src="/include/js/jquery.cookie.js"></script>-->
        <!-- end tooltips -->
        
        <!-- tooltips -->
        <script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/js/jquery.blockUI/jquery.blockUI.js"></script>
        <!-- end tooltips -->
        
        
        <script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/js/jquery.numeric.js"></script>
        
        <!-- Chosen jQuery -->
        <link type="text/css" href="<?php echo $this->baseUrl(); ?>/js/chosen/chosen.min.css" rel="stylesheet" />
        <script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/js/chosen/chosen.jquery.min.js"></script>
         
         <script type="text/javascript">
             function agregaMarcaUrl(marca) {
                history.pushState('', '', marca);
             }
         </script>

        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <!-- Le fav and touch icons -->
        <link rel="shortcut icon" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/favicon.ico">
        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/apple-touch-icon-144-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/apple-touch-icon-114-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/apple-touch-icon-72-precomposed.png">
        <link rel="apple-touch-icon-precomposed" href="<?php echo $this->baseUrl(); ?>/bootstrap/ico/apple-touch-icon-57-precomposed.png">
        <?php echo $this->headScript(); ?>
        <?php echo $this->headLink(); ?>
    </head>

    <body>
        <!-- navbar -->
        <div class="navbar navbar-fixed-top <?php echo isset($this->colorMenu) ? "navbar-inverse" : ""; ?>  noPrint" >
            <div class="navbar-inner">
                <div class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="#">CredyPhone 
                        <?php if ($this->usuario)  ?>
                        <b> <?php echo "(" . $this->usuario->getSucursal()->getDescripcion() . ")"; ?> </b>
                    </a>
                    <!-- user -->
                    <div class="btn-group pull-right">
                        <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="icon-user"></i> 
                            <?php if ($this->usuario) { ?>
                                <?php echo $this->usuario->getMail(); ?>
                            <?php } else { ?>
                                <?php echo "Iniciar Session" ?>
                            <?php } ?>
                            <span class="caret"></span>
                        </a>
                        <?php if ($this->usuario) { ?>
                            <ul class="dropdown-menu">
                                <li><a href="<?php echo $this->baseUrl(); ?>/admin/login/logout/">Salir</a></li>
                            </ul>
                        <?php } ?>
                    </div>
                    <!-- end user -->
                    <!-- option menu -->
                    <div class="nav-collapse">
                        <ul class="nav">
                            <li><a href="<?php echo $this->baseUrl(); ?>/usuarios/">Inicio</a></li>
                            <li class="dropdown">
                                <a class="dropdown-toggle" data-toggle="dropdown" href="#">Creditos<b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href="<?php echo $this->baseUrl("/usuarios/credito/registrar/"); ?>">Registrar</a></li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a class="dropdown-toggle" data-toggle="dropdown" href="#">Personas<b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><a href="<?php echo $this->baseUrl("/usuarios/cliente/registrar/"); ?>">Registrar</a></li>
                                    <li><a href="<?php echo $this->baseUrl("/usuarios/busqueda/persona/"); ?>">Buscar</a></li>
                                </ul>
                            </li>
                            <?php if ($this->usuario->tengoAcceso()) { ?>
                            <li class="dropdown">
                                <a class="dropdown-toggle" data-toggle="dropdown" href="#">Administraci&oacute;n<b class="caret"></b></a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                    <li class="dropdown-submenu">
                                        <a tabindex="-1" href="#">Usuarios</a>
                                        <ul class="dropdown-menu">
                                            <li><a href="<?php echo $this->baseUrl("/admin/usuario/registrar/"); ?>">Gesti&oacute;n de Usuarios</a></li>
                                            <li><a href="<?php echo $this->baseUrl("/admin/usuario/permisos/"); ?>">Permisos</a></li>
                                            <li><a href="<?php echo $this->baseUrl("/admin/usuario/sucursal/"); ?>">Sucursales</a></li>
                                        </ul>
                                    </li>
                                    <li><a href="<?php echo $this->baseUrl(); ?>/admin/configuracion/tasa/">Tasa</a></li>
                                    <li><a href="<?php echo $this->baseUrl(); ?>/admin/configuracion/tasanegocio/">Tasa Negocios</a></li>
                                    <li><a href="<?php echo $this->baseUrl(); ?>/admin/tablas/">Tablas</a></li>
                                    <li><a href="<?php echo $this->baseUrl("/admin/codigo/registrar/"); ?>">Generar Codigo de Acceso</a></li>
                                    <li><a href="<?php echo $this->baseUrl("/admin/index/listabackups/"); ?>">Listado y descarga de Backup</a></li>
                                    <li><a href="<?php echo $this->baseUrl("/admin/index/generarbackup/"); ?>">Generar y enviar Backup</a></li>
                                </ul>
                            </li>
                            <?php } ?>
                        </ul>
                    </div>
                   
                    <!-- end option menu -->
                </div>
            </div>
        </div>
        <!-- end navbar -->

        <div class="container-fluid">
            
            <div class="row-fluid noPrint" style="margin-top:-15px;">
                <div class="span3">
                    <legend><?php echo $this->titulo ?></legend>
                </div>
                <div class="span9" style="text-align: right;">
                    <a href="<?php echo $this->baseUrl() ?>/usuarios/cliente/registrar/inicio/1" class="btn btn-small" >
                        <i class="icon-user"></i> Clientes</a>
                    <a href="<?php echo $this->baseUrl() ?>/usuarios/credito/registrar" class="btn btn-small">
                        <i class="icon-file"></i> Creditos</a>
                    <a href="<?php echo $this->baseUrl() ?>/usuarios/busqueda/persona" class="btn btn-small">
                        <i class="icon-search"></i> B&uacute;squedas</a>
                    <a href="<?php echo $this->baseUrl() ?>/usuarios/cajadiaria" class="btn btn-small">
                        <i class="icon-book"></i> Caja D&iacute;aria</a>
                    <?php if ($this->usuario->getPerfil()->verMenuListado()): ?>
                        <a href="<?php echo $this->baseUrl() ?>/admin/listados/" class="btn btn-small">
                            <i class="icon-list"></i> Listados</a>
                    <?php endif; ?>
                    <a href="<?php echo $this->baseUrl() ?>/admin/impresiones/ventas/" class="btn btn-small">
                        <i class="icon-print"></i> Impresiones</a>
                    <a class="btn btn-small btn-inverse" href="javascript:history.back(1)">
                        <i class="icon-backward icon-white"></i> Volver</a>
                </div>
            </div>
            <div class="row-fluid noPrint">
                <?php
                    $data_form = array(
                        "b_nro_credito" => $this->b_nro_credito,
                        "b_nro_documento" => $this->b_nro_documento,
                        "b_nombres" => $this->b_nombres,
                        "b_apellido" => $this->b_apellido,
                        "b_telefono" => $this->b_telefono,
                        "b_nro_juicio" => $this->b_nro_juicio
                    );
                ?>
                <?php echo $this->partial('busqueda/form_persona.phtml', 'usuarios', $data_form); ?>
            </div>

            <?php echo $this->layout()->content ?>
        </div>
    <hr>
    <footer style="text-align: right;padding-right: 30px;" class="noPrint">
        <p>&copy; CredyPhone 2012</p>
    </footer>

</body>
</html>






